<?php 
class product_plugin_layout extends abstract_product_plugin {
 
    public function getProductLayoutId($product_id) {

		$query = $this->pdo->prepare("SELECT layout_id FROM " . $this->db_prefix . "product_to_layout 
            WHERE product_id = :product_id 
            AND store_id = :store_id");
	
        $query->execute(array(
            ':product_id'   => $product_id,
            ':store_id'     => $this->site_id
        ));

		if ($query->rowCount()) {
			return $query->fetchColumn();
        }

        return false;
    }
}
